home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_lag_rustycrank.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  67 lines

  1. # Jones 3D Cog Script
  2. #
  3. # lag_rustycrank.cog
  4. #
  5. # [DS]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # =======================================================================================
  10. symbols
  11.     message    startup
  12.     message    touched
  13.     message    activated
  14.  
  15.     thing        rustycrank
  16.     thing        player                        local
  17.     keyframe    in_reach=in_pickup_med.key            local
  18.     sound        foundSnd=INXJ179.wav                local
  19.     sound        ahaSnd=INXJ147.wav                local # Aha...
  20.     thing        player                        local
  21.     int        talking=0                        local
  22.  
  23. end
  24.  
  25. # ========================================================================================
  26.  
  27. code
  28. startup:
  29.     player = GetLocalPlayerThing();
  30.     return;
  31.  
  32. activated:
  33.     if(MakeMeStop() == -1)  return;
  34.  
  35.     DeselectWeaponWait(player);
  36.     StartCutscene(0);
  37.     PlayVoice(player, ahaSnd, 1.0, 0);
  38.  
  39.     # ----- Set Cam Offset ---------
  40.     if (Rand() < 0.5)
  41.     {
  42.         SetExtCamOffset('0.15 -0.05 0.04');
  43.     }
  44.     else
  45.     {
  46.         SetExtCamOffset('-0.15 -0.05 0.04');
  47.     }
  48.     SetExtCamLookOffset('0.0 0.02 0.0');
  49.  
  50.     PlayKey(player, in_reach, 4, 0x12, 0);
  51.     Sleep(0.5);
  52.     DestroyThing(rustycrank);
  53.  
  54.     # ----- Add Rusty Crank -------
  55.     ChangeInv(player, 73, 1.0);
  56.     SetInvAvailable(player, 73, 1);
  57.     JonesInvItemChanged(73);
  58.     Sleep(1.0);
  59.     PlayVoice(player, foundSnd, 1.0, 1);
  60.  
  61.     # ----- Reset Camera ----------
  62.     RestoreExtCam();
  63.     ClearActorFlags(player, 0x200000);
  64.     EndCutscene();
  65.     return;
  66. end
  67.